
/* __NR_urlfilter */
#define __NR_urlfilter  223

/* len */
#define MAX_CMDLEN    8191
#define MAX_RULENAME  31
#define MAX_URLNAME   31

/* kernel command */
enum UF_KERNEL_CMD
{
    UF_CMD_ADDURL = 0,
    UF_CMD_DELURL,
    UF_CMD_SHOW,
    UF_CMD_ACTION,
    UF_CMD_HTTPS,
    UF_CMD_DEBUG,
    //...
    UF_CMD_MAX
};

typedef struct UF_RuleInfo
{
    int action;     /* 0-drop, 1-pass */
    int https;      /* 0-disable, 1-enable */
    char url[MAX_URLNAME+1];
} UF_RuleInfo_S;

typedef struct UF_CfgOutput
{
    int ret;        /* code */
    char desc[64];  /* desc */
} UF_CfgOutput_S;

typedef struct UF_ShowHead
{
    int count;
    int unitsize;   /* reserved */
    int defaultact;
    int https;
} UF_ShowHead_S;

/* error */
enum UF_ERRCODE
{
    UF_ERR_SUCC = 0,
    UF_ERR_PARAM,
    // ...
    UF_ERR_FAILED = 999,
    UF_ERR_MAX
};

